﻿@model MVC.Models.Book

@{
    ViewBag.Title = "Details";
}

<h2>@Html.DisplayFor(model => model.Title)</h2>

<div>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Author)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Author)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Description)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Description)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Genre)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Genre)
        </dd>
    </dl>
</div>
<p>
    @Html.ActionLink("Back to List", "Index")
    @if (User.Identity.Name.Equals(Model.Creator))
    {
        <span> | </span>
        @Html.ActionLink("Edit", "Edit", new {id = Model.BookId})
    }

</p>
